﻿<%@ Page Title="Yeni Kullanıcı | TodayWho" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="signup.aspx.cs" Inherits="TodayWho.signup" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="Jcrop/css/jquery.Jcrop.css" type="text/css" /> 
    <script src="Jcrop/js/jquery.Jcrop.js" type="text/javascript"></script>
    <script src="/scripts/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
    <script src="scripts/signupTipsHelper.js" type="text/javascript"></script>
    
    <script type="text/javascript">

        $(window).load(function () {

            $("[id$='tempImage']").Jcrop({
                onChange: showPreview,
                onSelect: showPreview,
                setSelect: [0, 0, 200, 200],
                minSize: [175, 175],
                aspectRatio: 1
            });

        });

        function showPreview(coords) {
            if (parseInt(coords.w) > 0) {
                var rx = 150 / coords.w;
                var ry = 150 / coords.h;

                var width = $("[id$='tempImage']").width();
                var height = $("[id$='tempImage']").height();
                $("[id$='preview']").css({
                    width: Math.round(rx * width) + 'px',
                    height: Math.round(ry * height) + 'px',
                    marginLeft: '-' + Math.round(rx * coords.x) + 'px',
                    marginTop: '-' + Math.round(ry * coords.y) + 'px'
                });
            }
            var xField = document.getElementById('<%= _xField.ClientID %>');
            var yField = document.getElementById('<%= _yField.ClientID %>');
            var widthField = document.getElementById('<%= _widthField.ClientID %>');
            var heightField = document.getElementById('<%= _heightField.ClientID %>');

            xField.value = coords.x;
            yField.value = coords.y;
            widthField.value = coords.w;
            heightField.value = coords.h;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="content">
        
        <asp:Panel ID="pnl1" runat="server" DefaultButton="btnGoToStep2" >
        <div id="step1" runat="server" >
            <div class="signupTitle">Hesap Bilgileri (1/4)</div>
            <div id="accountPanel">
                <table width="100%" cellspacing="5px">
                <tr>
                    <td class="tdLabel">Email :</td>
                    <td><asp:TextBox ID="txtEmail" runat="server" CssClass="texts"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rqTxtEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ValidationGroup="vgGoToStep2" ErrorMessage="Lütfen email adresini giriniz." >*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="regMail" runat="server" ControlToValidate="txtEmail" ErrorMessage="Lütfen geçerli bir email adresi giriniz." ValidationGroup="vgGoToStep2"
			            ValidationExpression="^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" >*</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="tdLabel">Şifre :</td>
                    <td><asp:TextBox ID="txtPassword" runat="server" TextMode="Password" CssClass="texts"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rqTxtPassword" runat="server" ControlToValidate="txtPassword" Display="Dynamic" ValidationGroup="vgGoToStep2" ErrorMessage="Lütfen şifrenizi giriniz.">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="tdLabel">Kullanıcı Adı :</td>
                    <td style="font-size:16px">http://www.todaywho.com/
                        <asp:TextBox ID="txtUserName" runat="server"  CssClass="texts"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rqTxtUserName" runat="server" ControlToValidate="txtUserName" Display="Dynamic" ValidationGroup="vgGoToStep2" ErrorMessage="Lütfen kullanıcı adını giriniz.">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="right">
                        <asp:Button ID="btnGoToStep2" runat="server" CssClass="button" Text="Kaydol" OnClick="btnGoToStep2_OnClick" ValidationGroup="vgGoToStep2" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center" >
                        <asp:ValidationSummary ID="vsumStep1" runat="server" ValidationGroup="vgGoToStep2" DisplayMode="BulletList" ShowSummary="true" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center" >
                        <asp:Label ID="lblStep1Errors" runat="server" Visible="false" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
            </table>        
        </div>
        </div>
        </asp:Panel>

        <asp:Panel ID="pnl2" runat="server" DefaultButton="btnGoToStep3" >
        <div id="step2" runat="server" style="display:none">
            <div class="signupTitle">Kişisel Bilgiler (2/4)</div>
            <div id="personalPanel">
                <table width="100%" cellspacing="5px">
                    <tr>
                        <td class="tdLabel">Kategori :</td>
                        <td>
                            <asp:DropDownList ID="ddListCategory" runat="server" CssClass="select">
                                <asp:ListItem Text="Genel" Value="1" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Müzik" Value="2"></asp:ListItem>
                                <asp:ListItem Text="Spor" Value="3"></asp:ListItem>
                                <asp:ListItem Text="Sanat" Value="4"></asp:ListItem>
                                <asp:ListItem Text="Edebiyat" Value="5"></asp:ListItem>
                                <asp:ListItem Text="Tech" Value="6"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="tdLabel">Ad Soyad :</td>
                        <td><asp:TextBox ID="txtName" runat="server" CssClass="texts" ></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rqTxtName" runat="server" ControlToValidate="txtName" Display="Dynamic" ErrorMessage="Lütfen adınızı ve soyadınızı giriniz." ValidationGroup="vgGoToStep3">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="tdLabel">Kısa Bilgi :</td>
                        <td>
                            <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Rows="8" CssClass="texts" Width="400px" MaxLength="750"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rqTxtDescription" runat="server" ControlToValidate="txtDescription" Display="Dynamic" ErrorMessage="Lütfen kendinizi kısaca tanıtınız." ValidationGroup="vgGoToStep3">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="btnGoToStep3" runat="server" OnClick="btnGoToStep3_OnClick" ValidationGroup="vgGoToStep3" CssClass="button" Text="Devam" />
                        </td>
                    </tr>
                    <tr>
                    <td colspan="2" align="center" >
                        <asp:ValidationSummary ID="vsumStep2" runat="server" ValidationGroup="vgGoToStep3" DisplayMode="BulletList" ShowSummary="true" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center" >
                        <asp:Label ID="lblStep2Errors" runat="server" Visible="false" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                </table>        
            </div>
        </div>
        </asp:Panel>

        <asp:Panel ID="pnl3" runat="server" DefaultButton="btnGoToStep4" >
        <div id="step3" runat="server" style="display:none">
            <div class="signupTitle">Sosyal Network Bilgileri (3/4)</div>
            <div id="socialPanel">
                <table width="100%" cellspacing="5px">
                    <tr>
                        <td style="width:50px"><img src="images/socials/facebook.png" alt="" /></td>
                        <td class="tdLabel">Facebook :</td>
                        <td> <asp:TextBox ID="txtFacebook" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/twitter.png" alt="" /></td>
                        <td class="tdLabel">Twitter : </td>
                        <td><asp:TextBox ID="txtTwitter" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/blogger.png" alt="" /></td>
                        <td class="tdLabel">Blogger :</td>
                        <td><asp:TextBox ID="txtBlogger" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/wordpress.png" alt="" /></td>
                        <td class="tdLabel">Wordpress :</td>
                        <td><asp:TextBox ID="txtWordpress" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/linkedin.png" alt="" /></td>
                        <td class="tdLabel">Linkedin :</td>
                        <td><asp:TextBox ID="txtLinkedin" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/tumblr.png" alt="" /></td>
                        <td class="tdLabel">Tumblr :</td>
                        <td><asp:TextBox ID="txtTumblr" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/formspring.png" alt="" /></td>
                        <td class="tdLabel">Formspring :</td>
                        <td><asp:TextBox ID="txtFormspring" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/stumbleupon.png" alt="" /></td>
                        <td class="tdLabel">Stumbleupon :</td>
                        <td><asp:TextBox ID="txtStumbleupon" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/flickr.png" alt="" /></td>
                        <td class="tdLabel">Flickr :</td>
                        <td><asp:TextBox ID="txtFlickr" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/picasa.png" alt="" /></td>
                        <td class="tdLabel">Picasa :</td>
                        <td><asp:TextBox ID="txtPicasa" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/myspace.png" alt="" /></td>
                        <td class="tdLabel">Myspace :</td>
                        <td><asp:TextBox ID="txtMyspace" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/lastfm.png" alt="" /></td>
                        <td class="tdLabel">Lastfm :</td>
                        <td><asp:TextBox ID="txtLastfm" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/youtube.png" alt="" /></td>
                        <td class="tdLabel">Youtube :</td>
                        <td><asp:TextBox ID="txtYoutube" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/foursquare.png" alt="" /></td>
                        <td class="tdLabel">Foursquare :</td>
                        <td><asp:TextBox ID="txtFoursquare" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/website.png" alt="" /></td>
                        <td class="tdLabel">WebSite :</td>
                        <td><asp:TextBox ID="txtWebsite1" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/website.png" alt="" /></td>
                        <td class="tdLabel">WebSite(2) :</td>
                        <td><asp:TextBox ID="txtWebsite2" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="width:50px"><img src="images/socials/website.png" alt="" /></td>
                        <td class="tdLabel">Website(3) :</td>
                        <td><asp:TextBox ID="txtWebsite3" runat="server" CssClass="texts"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td colspan="3" align="right">
                            <asp:Button ID="btnGoToStep4" runat="server" OnClick="btnGoToStep4_OnClick" CssClass="button" Text="Devam" />
                        </td>
                    </tr>
                    <tr>
                    <td colspan="2" align="center" >
                        <asp:Label ID="lblStep3Errors" runat="server" Visible="false" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                </table>        
            </div>
        </div>
        </asp:Panel>

        <asp:Panel ID="pnl4" runat="server" DefaultButton="btnSignup" >
        <div id="step4" runat="server" style="display:none">
            <div class="signupTitle">Fotoğraf (4/4)</div>
            <div id="photoPanel">
                <table width="100%" cellspacing="5px">
                    <tr>
                        <td>
                            <div>
                                <asp:FileUpload ID="imgUpload" runat="server"  />
                                <asp:Button ID="upload" runat="server" Text="Yükle" OnClick="upload_OnClick" CssClass="button"/>
                                <p style="font-size:11px;line-height:1em;color:Gray;">
                                    Yükleyeceğiniz fotoğraf, sayfada uygun bir biçimde görünmesi için : <br />
                                    450x450 pixel boyutundan daha büyük ve en fazla 1.5 oranında olmalıdır.</p>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="hasImageDiv" runat="server" visible="false">
                                <table>
                                    <tr>
                                        <td>
                                            <img id="tempImage" runat="server" src="" alt="img"  />
                                        </td>
                                        <td>
                                            <div style="width:150px;height:150px;overflow:hidden;"> 
			                                    <img id="preview" runat="server" src="" alt="img"/> 
		                                    </div> 
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right">
                            <asp:Button ID="btnSignup" runat="server" CssClass="button" OnClick="saveImages_Click" Text="Tamamla" Visible="false" />
                        </td>
                    </tr>
                    <tr>
                        <asp:Label ID="lblImageError" runat="server" Text="Lütfen belirtilen oranlarda fotoğraf yükleyiniz." ForeColor="Red" Visible="false"></asp:Label>
                    </tr>
                </table>        
            </div>
        </div>
        </asp:Panel>

        <div id="step5" runat="server" style="display:none">
            <div class="signupTitle">Kayıt işlemi başarıyla tamamlanmıştır.</div>
            <div id="successPanel">
                <table width="100%" cellspacing="5px">
                <tr>
                    <td>Teşekkürler, bilgileriniz kaydedilmiştir. Moderatörlerimiz bilgilerin yayınlanabilir olup olmadığı kontrol edeceklerdir.
                        Uygun olmayan alanlar varsa, mail yoluyla size haber edilecektir.
                    </td>
                </tr>
                <tr>
                    <td>
                        ·  Sayfalar "First come, First serve" prensibiyle istenilen kategoride günün sayfası olacaktır.
                    </td>
                </tr>
                <tr>
                    <td>
                        ·  Sayfanız belirtilen kategoride günün sayfası olmadan bir hafta önce size mail yoluyla haber verilecektir.
                    </td>
                </tr>
                <tr>
                    <td>
                        ·  Sayfanıza tanımladığınız kullanıcı adı ile direkt link kullanarak da ulaşabilir ve arkadaşlarınızla paylaşabilirsiniz. 
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <asp:Button ID="btnGoHome" runat="server" CssClass="button" Text="Anasayfa" OnClick="btnGoHome_OnClick"  />
                    </td>
                </tr>
            </table>        
        </div>
        </div>
    </div>
    <input type="hidden" runat="server" id="_xField" />
    <input type="hidden" runat="server" id="_yField" />
    <input type="hidden" runat="server" id="_widthField" />
    <input type="hidden" runat="server" id="_heightField" />
</asp:Content>
